/*
 * @(#)MyEdge.java   09/09/13
 *
 * Copyright (C) 2009 Ecole des Mines d'Ales
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Contact: yulinz88@gmail.com
 *
 *
 *
 */



package fr.ema.arch3d.gea.config;

import fr.ema.arch3d.model.architecture.configuration.ComponentClass;
import fr.ema.arch3d.model.architecture.configuration.ConnectorClass;

import org.jgraph.graph.DefaultEdge;

/**
 * Class description
 *
 *
 * @version        1.0, 09/09/13
 * @author         Huaxi (Yulin) ZHANG
 */
public class MyEdge extends DefaultEdge {

    /** Field description */
    Object[] connector = new Object[4];

    /** Field description */
    String clientCmpName, serverCmpName;

    /** Field description */
    String clientItf, serverItf;

    /** Field description */
    String name;

    /**
     * Constructs ...
     *
     *
     * @param connector
     */
    public MyEdge(ConnectorClass connector) {
        name            = connector.getName();
        this.clientCmpName         = connector.getClientCmpName();
        this.serverCmpName         = connector.getServerCmpName();
        this.clientItf = connector.getClientCmpName();
        this.serverItf = connector.getServerItfName();
    }



    /**
     * Constructs...
     *
     *@param clientCmpName
     *@param serverCmpName
     *@param clientItf
     *@param serverItf
     *@param name
     */
    public MyEdge(String clientCmpName, String serverCmpName, String clientItf,
	    String serverItf, String name) {
	this.clientCmpName = clientCmpName;
	this.serverCmpName = serverCmpName;
	this.clientItf = clientItf;
	this.serverItf = serverItf;
	this.name = name;
    }



    Object[] getConnection() {
        return connector;
    }
}
